﻿/**********************************************************************
 * @file   FITKRadiossAdaptorPropSolidValue.h
 * @brief  默认实体属性读取适配器，设置某些参数的默认值
 * @author zhangjingx (hiter25@outlook.com)
 * @date   2025-07-11
 *********************************************************************/
#ifndef __FITKRADIOSSADAPTORPROPSOLIDVALUE_H__
#define __FITKRADIOSSADAPTORPROPSOLIDVALUE_H__
#include "FITKRadiossRadIOAPI.h"
#include "FITKRadiossAbstractAdaptor.h"
#include "FITK_Kernel/FITKAdaptor/FITKIOAdaptorFactory.h"

namespace Radioss
{
    class FITKPropSolidValue;
    /**
     * @brief  默认实体属性读取适配器，设置某些参数的默认值
     * @author zhangjingx (hiter25@outlook.com)
     * @date   2025-07-11
     */
    class FITKRadiossRadIOAPI FITKRadiossAdaptorPropSolidValue : public FITKRadiossAbstractAdaptor
    {
    public:
        explicit FITKRadiossAdaptorPropSolidValue() = default;
        ~FITKRadiossAdaptorPropSolidValue() = default;
        /**
         * @brief
         * @return   QString
         * @author   zhangjingx (hiter25@outlook.com)
         * @date     2025-07-08
         */
        QString getAdaptorClass() override;
        /**
         * @brief    适配器读取
         * @return   bool
         * @author   zhangjingx (hiter25@outlook.com)
         * @date     2025-07-08
         */
        bool adaptR() override;
        /**
         * @brief    适配器写出
         * @return   bool
         * @author   zhangjingx (hiter25@outlook.com)
         * @date     2025-07-08
         */
        bool adaptW() override;
    private:
        /**
         * @brief    读取part
         * @param[i] part 
         * @return   bool
         * @author   zhangjingx (hiter25@outlook.com)
         * @date     2025-07-11
         */
        bool readDefSolid(FITKPropSolidValue* solidval);
        /**
         * @brief    读取文件参数并赋值给对象
         * @param[i] solidValText 
         * @param[i] solidval 
         * @return   bool
         * @author   zhangjingx (hiter25@outlook.com)
         * @date     2025-07-15
         */
        bool readParam(const QStringList& lines, FITKPropSolidValue * solidval);
    };
    /**
     * @brief  注册适配器
     * @author zhangjingx (hiter25@outlook.com)
     * @date   2025-07-09
     */
    Register2FITKIOAdaptorFactory(rad, Radioss::FITKPropSolidValue, FITKRadiossAdaptorPropSolidValue);
    RegRadiossRadAdaptor(/DEF_SOLID, FITKRadiossAdaptorPropSolidValue);
}
#endif //!__FITKRADIOSSADAPTORPROPSOLIDVALUE_H__
